a80ea6904aa853de1569b484fac84cce52cf1153,idea/src/org/jetbrains/jet/plugin/quickfix/CreateMethodFromUsageFix.java,CreateMethodFromUsageFix,doInvoke,#Project#JetType#,543

Before Change


        ClassifierDescriptor ownerTypeDescriptor = ownerType.getConstructor().getDeclarationDescriptor();
        assert ownerTypeDescriptor != null && ownerTypeDescriptor instanceof ClassDescriptor;
        ownerClassDescriptor = (ClassDescriptor) ownerTypeDescriptor;
        receiverType = ownerClassDescriptor.getDefaultType();
        PsiElement typeDeclaration = BindingContextUtils.classDescriptorToDeclaration(currentFileContext, ownerClassDescriptor);
        if (typeDeclaration != null && typeDeclaration instanceof JetClass) {
            ownerClass = (JetClass) typeDeclaration;

After Change


        ClassifierDescriptor ownerTypeDescriptor = selectedReceiverType.getType().getConstructor().getDeclarationDescriptor();
        assert ownerTypeDescriptor != null && ownerTypeDescriptor instanceof ClassDescriptor;
        ownerClassDescriptor = (ClassDescriptor) ownerTypeDescriptor;
        JetType receiverType = ownerClassDescriptor.getDefaultType();
        PsiElement typeDeclaration = BindingContextUtils.classDescriptorToDeclaration(currentFileContext, ownerClassDescriptor);
        if (typeDeclaration != null && typeDeclaration instanceof JetClass) {
            ownerClass = (JetClass) typeDeclaration;